#include "AbsUI/SelectionView.hpp"
#include "Ctrl/SelectionModel.hpp"
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>

namespace AbsUI
{


SelectionView::SelectionView( Ctrl::SelectionModel& rSelectionModel )
	: rSelectionModel_( rSelectionModel)
{
	using namespace boost::lambda;
	rSelectionModel_.subscribeToSelectionChanged( bind( &SelectionView::handleChangeSelection, this, _1));
}

// ---------------------------------------------------------------------------------------------------------------------

void SelectionView::handleChangeSelection( const Ctrl::SelectionModel& mdl)
{
	this->changeSelection( mdl);
}

} // namespace AbsUI
